package com.rzl.expense.expense.service.twr.impl;

import java.util.List;

import com.rzl.expense.common.utils.DateUtils;
import com.rzl.expense.expense.domain.twr.TwrHighTower;
import com.rzl.expense.expense.mapper.twr.TwrHighTowerMapper;
import com.rzl.expense.expense.service.twr.ITwrHighTowerService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * 铁塔-高价塔占比分析Service业务层处理
 *
 * @author 董涛
 * @date 2024-11-18
 */
@Service
public class TwrHighTowerServiceImpl implements ITwrHighTowerService {
    @Autowired
    private TwrHighTowerMapper twrHighTowerMapper;

    /**
     * 查询铁塔-高价塔占比分析
     *
     * @param staDate 铁塔-高价塔占比分析主键
     * @return 铁塔-高价塔占比分析
     */
    @Override
    public TwrHighTower selectTwrHighTowerByYearMonth(String staDate) {
        return twrHighTowerMapper.selectTwrHighTowerByYearMonth(staDate);
    }

    /**
     * 查询铁塔-高价塔占比分析列表
     *
     * @param twrHighTower 铁塔-高价塔占比分析
     * @return 铁塔-高价塔占比分析
     */
    @Override
    public List<TwrHighTower> selectTwrHighTowerList(TwrHighTower twrHighTower) {
        return twrHighTowerMapper.selectTwrHighTowerList(twrHighTower);
    }

    /**
     * 新增铁塔-高价塔占比分析
     *
     * @param twrHighTower 铁塔-高价塔占比分析
     * @return 结果
     */
    @Override
    public int insertTwrHighTower(TwrHighTower twrHighTower) {
        twrHighTower.setCreateTime(DateUtils.getNowDate());
        return twrHighTowerMapper.insertTwrHighTower(twrHighTower);
    }

    /**
     * 修改铁塔-高价塔占比分析
     *
     * @param twrHighTower 铁塔-高价塔占比分析
     * @return 结果
     */
    @Override
    public int updateTwrHighTower(TwrHighTower twrHighTower) {
        return twrHighTowerMapper.updateTwrHighTower(twrHighTower);
    }

    /**
     * 批量删除铁塔-高价塔占比分析
     *
     * @param staDates 需要删除的铁塔-高价塔占比分析主键
     * @return 结果
     */
    @Override
    public int deleteTwrHighTowerByStaDates(String[] staDates) {
        return twrHighTowerMapper.deleteTwrHighTowerByStaDates(staDates);
    }

    /**
     * 删除铁塔-高价塔占比分析信息
     *
     * @param staDate 铁塔-高价塔占比分析主键
     * @return 结果
     */
    @Override
    public int deleteTwrHighTowerByStaDate(String staDate) {
        return twrHighTowerMapper.deleteTwrHighTowerByStaDate(staDate);
    }

    @Override
    public void batchTwrHighTower(List<TwrHighTower> list) {
        twrHighTowerMapper.batchTwrHighTower(list);
    }
}
